
package com.jiuqi.ccp.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpDtfConfig.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpDtfConfigForm"
 */
public class CcpDtfConfigForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cdcGuid = null;
   private java.lang.String _callId = null;
   private java.lang.String _opType = null;
   private java.lang.String _filePath = null;
   private java.lang.String _saveFile = null;
   private java.lang.String _opService = null;
   private java.lang.String _cdcTitle = null;
   private java.lang.String _cdcDesc = null;
   private java.lang.String _cgnGuid = null;
   private java.lang.String _label = null;
   private java.lang.String _module1 = null;
   private java.lang.String _module2 = null;
   private java.lang.String _module3 = null;
   private java.lang.String _module4 = null;
   private java.lang.String _module5 = null;
   private java.lang.String _module6 = null;
   private java.lang.String _module7 = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpDtfConfigForm() {
   }

   /**
    * Returns the cdcGuid
    *
    * @return the cdcGuid
    */
   public java.lang.String getCdcGuid() {
      return _cdcGuid;
   }

   /**
    * Sets the cdcGuid
    *
    * @param cdcGuid the new cdcGuid value
    */
   public void setCdcGuid(java.lang.String cdcGuid) {
      _cdcGuid = cdcGuid;
   }
   /**
    * Returns the callId
    *
    * @return the callId
    */
   public java.lang.String getCallId() {
      return _callId;
   }
   /**
    * Sets the callId
    *
    * @param callId the new callId value
    */
   public void setCallId(java.lang.String callId) {
      _callId = callId;
   }
   /**
    * Returns the opType
    *
    * @return the opType
    */
   public java.lang.String getOpType() {
      return _opType;
   }

   /**
    * Sets the opType
    *
    * @param opType the new opType value
    */
   public void setOpType(java.lang.String opType) {
      _opType = opType;
   }
   /**
    * Returns the filePath
    *
    * @return the filePath
    */
   public java.lang.String getFilePath() {
      return _filePath;
   }

   /**
    * Sets the filePath
    *
    * @param filePath the new filePath value
    */
   public void setFilePath(java.lang.String filePath) {
      _filePath = filePath;
   }
   /**
    * Returns the saveFile
    *
    * @return the saveFile
    */
   public java.lang.String getSaveFile() {
      return _saveFile;
   }

   /**
    * Sets the saveFile
    *
    * @param saveFile the new saveFile value
    */
   public void setSaveFile(java.lang.String saveFile) {
      _saveFile = saveFile;
   }
   /**
    * Returns the opService
    *
    * @return the opService
    */
   public java.lang.String getOpService() {
      return _opService;
   }

   /**
    * Sets the opService
    *
    * @param opService the new opService value
    */
   public void setOpService(java.lang.String opService) {
      _opService = opService;
   }
   /**
    * Returns the cdcTitle
    *
    * @return the cdcTitle
    */
   public java.lang.String getCdcTitle() {
      return _cdcTitle;
   }

   /**
    * Sets the cdcTitle
    *
    * @param cdcTitle the new cdcTitle value
    */
   public void setCdcTitle(java.lang.String cdcTitle) {
      _cdcTitle = cdcTitle;
   }
   /**
    * Returns the cdcDesc
    *
    * @return the cdcDesc
    */
   public java.lang.String getCdcDesc() {
      return _cdcDesc;
   }

   /**
    * Sets the cdcDesc
    *
    * @param cdcDesc the new cdcDesc value
    */
   public void setCdcDesc(java.lang.String cdcDesc) {
      _cdcDesc = cdcDesc;
   }
   /**
    * Returns the cgnGuid
    *
    * @return the cgnGuid
    */
   public java.lang.String getCgnGuid() {
      return _cgnGuid;
   }

   /**
    * Sets the cgnGuid
    *
    * @param cgnGuid the new cgnGuid value
    */
   public void setCgnGuid(java.lang.String cgnGuid) {
      _cgnGuid = cgnGuid;
   }
   /**
    * Returns the label
    *
    * @return the label
    */
   public java.lang.String getLabel() {
      return _label;
   }

   /**
    * Sets the label
    *
    * @param label the new label value
    */
   public void setLabel(java.lang.String label) {
      _label = label;
   }
   /**
    * Returns the module1
    *
    * @return the module1
    */
   public java.lang.String getModule1() {
      return _module1;
   }

   /**
    * Sets the module1
    *
    * @param module1 the new module1 value
    */
   public void setModule1(java.lang.String module1) {
      _module1 = module1;
   }
   /**
    * Returns the module2
    *
    * @return the module2
    */
   public java.lang.String getModule2() {
      return _module2;
   }

   /**
    * Sets the module2
    *
    * @param module2 the new module2 value
    */
   public void setModule2(java.lang.String module2) {
      _module2 = module2;
   }
   /**
    * Returns the module3
    *
    * @return the module3
    */
   public java.lang.String getModule3() {
      return _module3;
   }

   /**
    * Sets the module3
    *
    * @param module3 the new module3 value
    */
   public void setModule3(java.lang.String module3) {
      _module3 = module3;
   }
   /**
    * Returns the module4
    *
    * @return the module4
    */
   public java.lang.String getModule4() {
      return _module4;
   }

   /**
    * Sets the module4
    *
    * @param module4 the new module4 value
    */
   public void setModule4(java.lang.String module4) {
      _module4 = module4;
   }
   /**
    * Returns the module5
    *
    * @return the module5
    */
   public java.lang.String getModule5() {
      return _module5;
   }

   /**
    * Sets the module5
    *
    * @param module5 the new module5 value
    */
   public void setModule5(java.lang.String module5) {
      _module5 = module5;
   }
   /**
    * Returns the module6
    *
    * @return the module6
    */
   public java.lang.String getModule6() {
      return _module6;
   }

   /**
    * Sets the module6
    *
    * @param module6 the new module6 value
    */
   public void setModule6(java.lang.String module6) {
      _module6 = module6;
   }
   /**
    * Returns the module7
    *
    * @return the module7
    */
   public java.lang.String getModule7() {
      return _module7;
   }

   /**
    * Sets the module7
    *
    * @param module7 the new module7 value
    */
   public void setModule7(java.lang.String module7) {
      _module7 = module7;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCdcGuid() == null) {
         errors.add("cdcGuid", new ActionError("error.cdcGuid.required"));
      }
      if(getOpType() == null) {
         errors.add("opType", new ActionError("error.opType.required"));
      }
      if(getOpService() == null) {
         errors.add("opService", new ActionError("error.opService.required"));
      }
      if(getCdcTitle() == null) {
         errors.add("cdcTitle", new ActionError("error.cdcTitle.required"));
      }
      // TODO test format/data
      return errors;
   }
}
